fix(runtime): advance idle discovery freshness heartbeat#62
Conversation
ls-remote에서 변경 없음이 확인되거나 fetch 후 새 작업이 없는 repository도 incremental health를 전진시켜 freshness 평가가 실제 지속 점검 의미와 맞도록 한다. 새 job, missing cursor, non-fast-forward 경로는 기존처럼 worker/후속 검증에 맡긴다. 검증: - uv run ruff check src/security_scanner/runtime/incremental_discovery.py tests/test_incremental_discovery.py tests/test_m4_poll_baseline.py - uv run pytest Co-Authored-By: Codex GPT-5 <noreply@openai.com>
There was a problem hiding this comment.
Code Review
This pull request updates the incremental discovery process to track skipped idle targets and conditionally advance repository health when running in enqueue mode, ensuring repositories are marked as incrementally fresh when no new work is observed. The reviewer suggests wrapping the advance_repo_health calls in try-except blocks to prevent transient database failures from aborting the discovery process, as these are best-effort, non-transactional operations.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
incremental discovery heartbeat write 실패가 전체 discovery 실행을 중단하지 않도록 best-effort helper로 격리한다. transient REPO_HEALTH write failure가 있어도 scan job discovery와 ref observation 본류는 계속 진행된다. 검증: - uv run ruff check src/security_scanner/runtime/incremental_discovery.py tests/test_incremental_discovery.py tests/test_m4_poll_baseline.py - uv run pytest tests/test_incremental_discovery.py tests/test_m4_poll_baseline.py tests/test_cli_timer_entrypoints.py tests/test_repo_health_freshness.py - uv run pytest Co-Authored-By: Codex GPT-5 <noreply@openai.com>
PR branch에 main merge commit이 추가된 뒤 GitHub required checks가 새 head에 붙지 않아 branch policy가 merge를 차단했다. 빈 commit으로 pull_request synchronize 이벤트를 발생시켜 동일 diff에 대해 required checks를 재실행한다. Co-Authored-By: Codex GPT-5 <noreply@openai.com>
What
REPO_HEALTH.lastSuccessfulIncrementalAtwhen incremental discovery successfully confirms that a repository has no new incremental work.DISCOVERY_MODE_INITIALIZE, missing cursor, non-fast-forward, and pending-work paths from marking a repository fresh.Why
lastSuccessfulIncrementalAtis an incremental discovery heartbeat, not proof that every commit scan completed. Whendiscover-updates --ls-remote-skipor the fetch path confirms no new work, freshness should not report a stale repository solely because it was idle.Actual scan completion and dedupe proof remain in
SCAN_JOBandSCAN_LEDGER. Baseline freshness remains separate throughlastSuccessfulFullScanAt.Review
codebase_architecture_manager; initial initialize/no-refs blocker was fixed.system_architecture_manager; no remaining system-level blocker.Verification
uv run ruff check src/security_scanner/runtime/incremental_discovery.py tests/test_incremental_discovery.py tests/test_m4_poll_baseline.pyuv run pytest tests/test_incremental_discovery.py tests/test_m4_poll_baseline.py tests/test_cli_timer_entrypoints.py tests/test_repo_health_freshness.pyuv run pytestCloses #61